1. Field of the Invention
This invention relates to a reduced Z-buffer generating technology, a hidden surface removal technology, an occlusion culling technology, and a rendering processing technology in computer graphics.
2. Description of the Related Art
When rendering three-dimensional objects in 3D computer graphics, a hidden surface removal process is performed to remove hidden surfaces behind other objects. Z-buffer method is one of typical techniques for the hidden surface removal process. In the Z-buffer method, the hidden surface removal process is performed by: retrieving the per-pixel Z value from a Z-buffer which contains Z values or depth information pixel by pixel on screen; and rendering a target pixel to be processed if the pixel lies in front of the position indicated by the corresponding per-pixel Z value, and canceling rendering processing for the target pixel if the pixel lies behind the position.
The Z-buffer method requires as much memory capacity as that of a frame buffer which stores the color values of the pixels. The frame buffer will not be accessed where target pixels subject to hidden surface removal are concerned, since the pixel values of those pixels need not be written. The Z-buffer, on the other hand, must be consulted for Z values to perform a Z test even on pixels that end up being subjected to hidden surface removal, thus resulting in a higher processing cost.
Since the Z-buffer method requires a large memory capacity and a high processing cost, various ideas have recently been devised to reduce the cost involved in the hidden surface removal process as much as possible. For example, occlusion culling is performed to select a hidden object behind the other objects and exclude it from rendering targets in advance. The occlusion culling makes it possible to choose rendering targets on a per-object or per-polygon basis for the purpose of reduction at an earlier stage prior to a rasterization process.
Moreover, an early Z culling may be performed to remove hidden and invisible fragments at the stage of generating fragments prior to pixel processing. A hierarchical Z culling may also be performed, which uses a hierarchical Z-buffer including different resolutions of Z-buffers stacked hierarchically. These techniques make the hidden surface removal process more efficient.
One of the occlusion culling methods is to form a bounding volume around an object so as to include the object, and exclude the object from rendering targets if its bounding volume is entirely hidden behind the bounding volumes of the other objects. This requires the computation, prior to rasterization process, to detect whether or not a bounding volume is entirely hidden behind the other bounding volumes on screen coordinates. The occlusion culling process increases in difficulty as the recent 3D graphics utilizes an enormous number of objects to be rendered and the positional relationship between the objects is more complicated.
The Z culling using a hierarchical Z-buffer also leads to a high computation cost. The generation of the hierarchical Z-buffer requires the process for providing a per-pixel Z-buffer and then reducing its resolution stepwise so as to generate Z-buffers having the different resolutions.